Axis Pipe Block

Making the link between the logical and physical worlds, the Axis pipe block manages the data on positions.

Axis Pipe Block Positions

Figure 5-9: Axis Pipe Block Positions

About Associated Data on Positions

The following data are illustrated in the figure below.


  • All positions are in user units with Modulo applied if active, unless specified.

Position / Offset Description
ActualPosition

Actual refers to the actual position of the underlying Drive. It is the current position of the drive in user units. It is the sum of the feedback value (Position actual value) returned from the communication link to the drive, the Power ON Delta Offset, and any zero-offset due to an MLWritePos function (MLAxisWritePipPos, MLAxisWritePos). Normally the value of power on delta offset is zero.

ActualPos := FeedbackPos + ZeroOffset
CurrentPosition

Current position is the actual command value being sent to the drive. It is an unsigned 32-bit integer value (fraction = zero). When in the power on condition this value is the command value that represents the target value in the communication link (Position demand value). It is not in user units, but in Drive units of 2**20 units per revolution of the drive.

CurrentPos := ReferencePosition + ZeroOffset
FeedbackPosition Feedback Position is the “Position actual value” read from the drive. FeedbackPos relates to the TxPDO value of 'Actual position value'
GeneratorPosition Generator position is the summation of all previous commands to the Axis internal trapezoidal motion generator. It is also a collector of uncompensated motion due to MLAxisWritePos() being used to modify actual position via the zero offset value and the adjustment in commanded value to insure no steps in the Current position command. It also accumulates changes in pipe position due to activate and deactivation of the pipe and convertor output to pipe position of the axis.
MotorPosition

Motor position relates to the RxPDO value of 'Position demand value'

MotorPosition = CurrentPos + PowerOnDeltaOffset
PipePosition The output of the convertor block is written into the PipePosition value whenever the convertor block is connected to the axis and the pipe is active.
Power ON Delta Offset A change was made a long time ago to allow absolute feedback to be passed into the axis rather than always starting at zero actual position. Units are in Drive units of 2**20 units per revolution. On Drive Power On this value is set to be the difference between the “ActualPosition value” and the “Position demand value” last sent to the drive. It is then added to the Current position value when the “Position demand value” is updated. It is read in User Units without periodicity applied.
ReferencePosition

Reference position is the summation of PipePosition and GeneratorPosition.

ReferencePosition = Pipe Position + Generator Position
Zero Offset Affected by the MLAxisWritePos() function to adjust the actual position to the desired value of the command by setting zero offset to the difference between the desired and actual position, and applying the change to modify the generator position so that the reference position tracks the change in reference.

User Units (abreviated UU) are the dimensions that will be used in the application code to define axis position or distance for an axis.

The "user units per revolution" field is used to set how many of these custom units are associated with one revolution of the motor. Some examples for this field are:

User Units User Units per Revolution Value Notes
Degrees 360.0  
Gradians 400.0  
Radians 3.14159265358979324  
Inches 15.7079632679489662 This equals pi*5 which is the circumference of a 5" diameter drum

KAS standard units for velocity and acceleration are UU/sec and UU/sec2.

Functions That View Axis Block Positions

MLAxisReadActPos Returns the Actual Position
MLAxisCmdPos Returns the Reference Position
MLAxisFBackPos Returns the Feedback Position
MLAxisGenPos Returns the Generator Position
MLAxisPipePos Returns the PipePosition

Functions That Change Axis Positions

MLAxisAdd This function adds a relative distance to the current target Generator Position.
MLAxisRel This function adds a relative distance to the current Generator Position.
MLAxisAbs This function sets a new target Generator Position.
MLAxisMoveVel This function sets the generator position moving at a programmed speed.
MLAxisStop This function stops any current Generator Motion. It also causes the axis to start ignoring any changes in Pipe position to be added into the reference position. It decelerates, if moving, at a programmed rate.
MLAxisReAlign Causes the Axis to move by a programmed amount without changing the Reference Position following an MLAxisStop. Also allows the Pipe Position to be used following an MLAxisStop.
MLAxisWritePos If convertor is not connected, Zero Pipe Position and Pipe Offset. If convertor is connected (pipe active also), the pipe position and offset are left alone. The actual position is then set equal to the target position, and the Zero Offset is adjusted for no motion. The Reference position and Generator Positions are then realigned so that the new reference position creates no step in motion, with the lag between reference position and actual position being absorbed in the generator position.
MLAxisWritePipPos Changes the pipe position to be the new value. May cause step motion.
MLCNVConnect Initializes the pipe position to the Convertor block output value, and adjusts the axis Pipe Offset so that no jump in motion is generated.
MLCNVDisconnect Stops sending the convertor output to the Pipe Position, and disconnects the convertor from the axis.
MLPipeAct Starts calculating Pipe data and if the convertor block is connected to the axis it will reconnect the convertor and start updating the pipe position with any changes.
MLPipeDeact Stops sending Pipe data to the Axis Block Pipe Position and disconnects the convertor output from the axis.

Axis Block Initialization

A call to the MLAxisInit function block is required to implement motion for the axis.

  • All positions and offsets are set to zero
  • The Axis Block motion generator is initialized with the proper ranges
  • The values are "aligned": ReferencePosition = Pipe Position + Generator Position

Axis Connection to a Pipe

A call to the MLPN_CONNECT FunctionClosedA function calculates a result according to the current value of its inputs. A function has no internal data and is not linked to declared instances. or the MLCNVConnect function block is required to get motion generated in the pipe to the Axis

  • Pipe Offset is calculated as follows: Pipe Offset = Pipe Position – Reference Position
  • The values are “aligned”: Reference Position = Pipe Position + Generator Position

Realigning Positions

A call to the MLAxisReAlign function block is used to realign the axis after an error occurs

  • Motion must come to a stop first
  • The MLAxisReAlign is executed
    You must set the movement of this block to MLAxisReadActPos - MLAxisCmdPos
  • The target position must be reached before any additional motion can occur.
    It can be checked by using the MLAxisReAlgnRdy function block

Set Zero Axis

A call to the MLAxisWritePos function block is used to set a position offset at the Axis when the Pipe Network is not yet connected

  • Pipe Position and Pipe Offset are set to zero
  • Generator Position is set to equal to Zero Position
    (Zero Position is defined in MLAxisWritePos function block)
  • Then Reference Position equals Pipe Position + Generator Position

Homing

HomingClosedThe Homing procedure allows, based on a position measurement, to set a position offset to the motor in order to ensure it is physically at the home position is the process of moving the motor to a known physical reference point on the machine.

Drive Homing: The AKD contains various pre-configured homing modes that avoid creating code. These home modes are drive-controlled and selected using the AKDHome function block .

Controller Homing: This homing type requires code in the application or UDFBs to perform the homing move.

Each axis is homed using MLAxis function blocks only (the Pipe Network is not used). Typically homing is done with MLAxisRel and MLAxisAbs to make motion and MLAxisWritePos to set a position offset.

Single-Axis Operation

This includes motion done on an individual axis: jogging, absolute move, or incremental moves. If these are single-axis based, then motion is executed with the MLAxisMoveVel, MLAxisAbs, and MLAxisRel FBs. These motions are typically done during machine setup or adjustment and are often referred to as manual mode. For these operations, the Pipe Network does not need to be connected to the axis.

Multi-Axis Operation

For multi-axis applications, automatic operation requires motion synchronization between two or more axes and the Pipe Network is required to achieve the synchronization. To start up the Pipe Network the following two functions must be executed in an application program:

PipeNetwork(MLPN_ACTIVATE):
PipeNetwork(MLPN_CONNECT);

Multi-axis synchronized motion is then accomplished using a motion block associated with one of the three input Pipe Blocks:

Monitoring an axis

There are function blocks to monitor the performance and status of an axis. The key function blocks are as follows:

Concept Link IconSee Also